package com.mygdx.game_objects;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;

public class Birds {

	private Rectangle birdShape;
	private int width, height;
	private Vector2 position;
	private Vector2 velocity;
	
	public Birds(int genre, float x, float y, int width, int height){
		position = new Vector2(x, y);
		velocity = new Vector2(40, 0);
		this.width = width;
		this.height = height;
	}
	
	public void update(float delta) {
		position.add(velocity.cpy().scl(delta));
		if(position.x + width > Gdx.graphics.getWidth()) {
			velocity.x = -velocity.x;
		} else if (position.x < 0) {
			velocity.x = Math.abs(velocity.x);
		}
	}
	
	public void Walk(){
		
	}
	
	public void Drop() {
		
	}
	
}
